<template>
<div>
    <header-component></header-component>
    <router-link to="/home/searchInfo" ></router-link>
    <router-view ref='body-view'/>
</div>
</template>
<script>
  import HeaderComponent from "../../components/HeaderComponent.vue";
  import Chat from "../../views/front/chat/chat"

    export default {
      components: {
        HeaderComponent,
        Chat
      },
      data(){
        return {
          workInfoList:[],
          searchContent:"",
          pageSize: 8,
          pageNum: 0,
          isClearData:false,
          queryFlag: true//如果返回数据为空的话,就把这个参数设置为false,避免重复请求数据
        }
      },
      name: "homePageBody",
      methods:{
        searchWorkInfo:function (searchContent) {//搜索任务详情
          //跳转到搜索页面
          this.$router.push({
            path:"/home/searchResultInfo",
            query:{
              "searchContent":searchContent
            }
            })

          this.$refs['body-view'].queryFlag = true;
          this.$refs['body-view'].pageSize = 8;
          this.$refs['body-view'].pageNum = 0;
          this.$refs['body-view'].isClearData = true;
          this.$refs['body-view'].searchContent = searchContent;
          this.$refs['body-view'].queryWorkInfo();
        },
        showResourceMarket:function () {//显示资源市场信息
          //跳转到搜索页面
          this.$router.push({
            path:"/home/resourceHome"
          })
        },
        showSelfInfo:function () {
          this.$router.push({
            path:"/home/selfHome"
          })
        }
      },
      mounted() {

      }
    }
</script>



<style scoped>

  .load-more{
    text-align: center;
    width: 100%;
    font-size: 15px;
    font-weight: 600;
  }

  .rightInfo{
    display: inline-block;
    background-color: #f6f6f6;
    margin-left: 15px;
    width: 15%;
    position: sticky;
    top: 74px;
    vertical-align: top;
  }

.global-writer-info{
  display: flex;
  justify-content: space-around;
}

  .global-writer{
    background-color: white;
    height: 50px;
    padding-top: 40px;
  }








  .global-writer-info .title{
    cursor: pointer;
    font-weight: 100;
    font-size: 18px;
  }

  .main-body{
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    padding-right: 10px;
    padding-bottom: -10px;
  }

  .main-body-swap{
    display: inline-block;
    width: 60%;
    background-color: white;
    padding: 10px 10px;
    margin-left: 10%;
    margin-top: 10px;
  }


  .card-item-body{
    display: inline-block;
    padding: 10px 10px;
    border: solid 1px #eeeeee;
    margin-left: 10px;
    margin-bottom: 10px;
    width: 100%;
    height:  96px;
  }
  .card-item-body:hover{
   box-shadow: 0px 0px 8px #cccccc;
    cursor: pointer;
  }
  .card-title-font{
    font-size: 18px;
    font-weight: 600;
    color: #1a1a1a;
    vertical-align: middle;
  }
  .card-content-body{
    display: block;
    height: 54px;
    margin-top: 10px;
    width: 80%;
  }

  .main-body-header-nav{
    margin-left: 12px;
    margin-top: 15px;
    margin-bottom: 14px;
    font-size: 15px;
    font-weight: 600;
    border-bottom: 1px solid #dccce5a6;
    padding-bottom: 10px;
  }

  .active{
    color: #0084ff;
  }

  .main-body-header-nav .span-margin{
    margin-right: 10px;
  }
  .card-item-status-unfindish{
    background-color: #f90;
    color: white;
    padding: 6px 8px;
    vertical-align: middle;
  }
  .card-item{
    display: inline-block;
    vertical-align: text-bottom;
  }
  .card-item-status{
    display: inline-block;
    vertical-align: text-bottom;
    padding-left: 20px;
  }

  .container-body{
    background-color: #f6f6f6;
    min-height: 790px;
  }
</style>
